using System.Runtime.InteropServices;

namespace WindowsAPI.COM
{
    [ComVisible(false), ComImport, Guid("E8025004-1C42-11d2-BE2C-00A0C9A83DA1")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IColumnProvider
    {
        [PreserveSig]
        int Initialize(LPCSHCOLUMNINIT psci);

        [PreserveSig]
        int GetColumnInfo(int dwIndex, out SHCOLUMNINFO psci);

        /// <summary>
        /// Note: these objects must be threadsafe!  GetItemData _will_ be called
        /// simultaneously from multiple threads.
        /// </summary>
        [PreserveSig]
        int GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, out object /*VARIANT */ pvarData);
    }
}